package example.exception;

import example.constant.ResponseEnum;

/**
 * Created by zhangshi on 2017/4/17.
 */
public class BizException extends IllegalArgumentException {

    private String code;
    private String message;
    public BizException(String code, String message){
        this.code = code;
        this.message = message;
    }
    public BizException(ResponseEnum response){
        this.code = response.getCode();
        this.message = response.getMessage();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
